﻿<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="ibatisnet" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <statements>
    <select id="ProcessCategoryLogic_GetList" resultClass="Workflow.Entity.ProcessCategoryEntity" >
      SELECT DISTINCT CATEGORYNAME,CORDER FROM WF_CATEGORY ORDER BY CORDER
    </select>

    <select id="ProcessCategoryLogic_GetProcessList" resultClass="Workflow.Entity.ProcessEntity" >
      SELECT * FROM WF_CATEGORY WHERE 1=1
      <dynamic prepend="AND">
        <isParameterPresent>
          CATEGORYNAME=#CATEGORYNAME#
        </isParameterPresent>
      </dynamic>
      
    </select>
    <!--<select id="ProcessCategoryLogic_GetList" resultClass="Workflow.Entity.ProcessCategoryEntity" >
      SELECT NAME as CATEGORYNAME FROM COLLABORATION WHERE TYPE=1 AND PARENTID&lt;&gt;'0' ORDER BY NAME ASC
    </select>

    <select id="ProcessCategoryLogic_GetProcessList" resultClass="Workflow.Entity.ProcessEntity" >
      SELECT a.NAME as PROCESSNAME,b.NAME as CATEGORYNAME
      FROM COLLABORATION a
      INNER JOIN COLLABORATION b ON a.PARENTID=b.ID AND b.PARENTID ='1' and b.TYPE=1
      where a.TYPE=101
      <dynamic prepend="AND">
        <isParameterPresent>
          b.NAME=#CATEGORYNAME#
        </isParameterPresent>
      </dynamic>
      ORDER BY CATEGORYNAME
    </select>-->

  </statements>
</sqlMap>